﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="admin_manager_managerList" Codebehind="managerList.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title>部门管理</title>
    <link href="../css/skin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/main.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.js"></script>
</head>



<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>     
            <td class="td_middle_middle">
                <div class="maincontent">
                    <form id="formSearch" action="managerList.aspx">
                        <input id="btnAddType" type="button" style='display:<%=AddDisplay %>; float:left;'  class="formButton" value="员工添加"  onclick="location.href='manager.aspx?ot=ad&pid=<%=pid %>';"  />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            查找：</label>
                        <select id="selectType" name="t">
                            <option value="AdminName" selected="selected">用户名称</option>
                        </select>
                        <input id="Text1" type="text" name="kw" value="<%=kw %>" />
                        <input id="btnSearch" type="submit" class="formButton" value="搜  索" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            每页显示：</label>
                        <select id="selectPageSize" name="ps" onchange="SetPageSize();">
                            <option value="10">10</option>
                            <option value="20" selected="selected">20</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                        </select>
                        <input id="hdPid" type="hidden" value="<%=pid %>" name="pid" />
                    </form>
                    <form id="form2" runat="server">
                        <table cellpadding="0" cellspacing="0">
                            <tr class="tr_title">
                                <td>
                                    <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'Item')" title="全选/反选" />
                                </td>
                                <td>
                                    <span onclick="SetOrder('AdminName');">用户名称</span></td>
                                <td>
                                    <span onclick="SetOrder('DepName');">部门名称</span></td> 
                                <td>
                                    <span>用户角色</span></td> 
                                <td>
                                    <span onclick="SetOrder('LoginDegree');">登录次数</span></td> 
                                  <td>
                                    <span onclick="SetOrder('logintime');">最后登录时间</span></td> 
                                     <td>
                                    <span onclick="SetOrder('loginIP');">最后登录IP</span></td> 
                                <td>
                                    操作</td>
                            </tr>
                            <asp:Repeater ID="rptManager" runat="server" OnItemDataBound="rptManager_ItemDataBound" >
                                <ItemTemplate>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input id='cb<%# Eval("AdminId") %>' name="Item" type="checkbox" onclick="ShowDelete();" value='<%# Eval("AdminId") %>' />
                                              </td>
                                              <td> <%# Eval("AdminName")%></td>
                                              <td> <%# Eval("DepName")%></td>
                                              <td> <%# Eval("RoleNames")%></td>
                                              <td> <%# Eval("LoginDegree")%></td>
                                              <td> <%# Eval("logintime")%></td>
                                              <td> <%# Eval("loginIP")%></td>
                                            <td>
                                             <div style="float:left; display:block;" id="divEdit" runat="server">  <a href="manager.aspx?ot=ed&id=<%# Eval("Adminid") %>"  title="编辑">[编辑]</a></div>
                                            <div style="float:left; display:block;" id="divDeleted" runat="server">  <a title="删除" href="managerList.aspx?id=<%# Eval("Adminid") %>&action=del" onclick="javascript:return confirm('确定要删除吗？');">[删除]</a></div>
                                            <div style="float:left; display:block;" id="divPermission" runat="server">  <a href="managerRole.aspx?ot=ed&id=<%# Eval("Adminid") %>"  title="权限">[权限]</a></div>
         
                                            </td>
                                        </tr>
                                    </tbody>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="8" style="text-align: center;">
                                            <label id="lblEmpty" style='display: <%# rptManager.Items.Count==0?"block":"none"%>;
                                                color: Red;'>
                                                没有找到任何记录</label>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
          
                        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return confirm('确定要删除吗？');"
                            OnClick="btnDelete_Click" EnableViewState="false" CssClass="formButton" />
                        <% Response.Write((new Gift.WebApp.PageListNo()).DisplayPage(total, pageSize, pageIndex)); %>
                    </form>
                </div>
            </td>
           
        </tr>
       
    </table>
</body>
</html>



 
